package com.njthird.busi.service.impl;

import java.util.List;
import com.njthird.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.njthird.busi.mapper.BusiCustomersMapper;
import com.njthird.busi.domain.BusiCustomers;
import com.njthird.busi.service.IBusiCustomersService;

/**
 * 客户管理Service业务层处理
 * 
 * @author njthird
 * @date 2020-08-06
 */
@Service
public class BusiCustomersServiceImpl implements IBusiCustomersService 
{
    @Autowired
    private BusiCustomersMapper busiCustomersMapper;

    /**
     * 查询客户管理
     * 
     * @param id 客户管理ID
     * @return 客户管理
     */
    @Override
    public BusiCustomers selectBusiCustomersById(String id)
    {
        return busiCustomersMapper.selectBusiCustomersById(id);
    }

    /**
     * 查询客户管理列表
     * 
     * @param busiCustomers 客户管理
     * @return 客户管理
     */
    @Override
    public List<BusiCustomers> selectBusiCustomersList(BusiCustomers busiCustomers)
    {
        return busiCustomersMapper.selectBusiCustomersList(busiCustomers);
    }

    /**
     * 新增客户管理
     * 
     * @param busiCustomers 客户管理
     * @return 结果
     */
    @Override
    public int insertBusiCustomers(BusiCustomers busiCustomers)
    {
        busiCustomers.setCreateTime(DateUtils.getNowDate());
        return busiCustomersMapper.insertBusiCustomers(busiCustomers);
    }

    /**
     * 修改客户管理
     * 
     * @param busiCustomers 客户管理
     * @return 结果
     */
    @Override
    public int updateBusiCustomers(BusiCustomers busiCustomers)
    {
        busiCustomers.setUpdateTime(DateUtils.getNowDate());
        return busiCustomersMapper.updateBusiCustomers(busiCustomers);
    }

    /**
     * 批量删除客户管理
     * 
     * @param ids 需要删除的客户管理ID
     * @return 结果
     */
    @Override
    public int deleteBusiCustomersByIds(String[] ids)
    {
        return busiCustomersMapper.deleteBusiCustomersByIds(ids);
    }

    /**
     * 批量重置密码
     * @param ids
     * @return
     */
    @Override
    public int resetBusiCustomersByIds(String[] ids)
    {
        return busiCustomersMapper.resetBusiCustomersByIds(ids);
    }
    /**
     * 删除客户管理信息
     * 
     * @param id 客户管理ID
     * @return 结果
     */
    @Override
    public int deleteBusiCustomersById(String id)
    {
        return busiCustomersMapper.deleteBusiCustomersById(id);
    }
}
